/**
 * 
 */
package cyclopean.world;

import javax.media.opengl.GL;

import cyclopean.world.actor.Pawn;

import javagame.core.io.Screen.ScreenRenderer;

// TODO Javadoc
/**
 * <br>
 *
 * @author Jaco van der Westhuizen
 */
class SkyRenderer implements ScreenRenderer
{
    private final Player player;
    
    SkyRenderer(Player player)
    {
        this.player = player;
    }

    /* (non-Javadoc)
     * @see javagame.core.io.Screen.ScreenRenderer#loadAssets(javax.media.opengl.GL, boolean)
     */
    @Override
    public void loadAssets(GL gl, boolean isInitial)
    {
        // TODO Auto-generated method stub
        
    }

    /* (non-Javadoc)
     * @see javagame.core.io.Screen.ScreenRenderer#onScreenReshape(int, int)
     */
    @Override
    public void onScreenReshape(int width, int height)
    {
        // TODO Auto-generated method stub
        
    }

    /* (non-Javadoc)
     * @see javagame.core.io.Screen.ScreenRenderer#renderForDisplay(javax.media.opengl.GL)
     */
    @Override
    public void renderForDisplay(GL gl)
    {
        Pawn pawn = player.getPawn();
        
        if (pawn == null)
        {
            // TODO Render limbo
        }
        else
        {
            // TODO Render weather sky
            gl.glClearColor(0, 0.5f, 1, 1);
            gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);
        }
    }

    /* (non-Javadoc)
     * @see javagame.core.io.Screen.ScreenRenderer#renderForPicking(javax.media.opengl.GL)
     */
    @Override
    public void renderForPicking(GL gl)
    {
        // TODO Auto-generated method stub
        
    }

    /* (non-Javadoc)
     * @see javagame.core.io.Screen.ScreenRenderer#unloadAssets(javax.media.opengl.GL, boolean)
     */
    @Override
    public void unloadAssets(GL gl, boolean isFinal)
    {
        // TODO Auto-generated method stub
        
    }
}
